package com.xingxuecn.demos.mybatis.service.impl;

import com.xingxuecn.demos.mybatis.domain.User;
import com.xingxuecn.demos.mybatis.mapper.SqlSessionFactoryContainer;
import com.xingxuecn.demos.mybatis.mapper.UserMapper;
import com.xingxuecn.demos.mybatis.service.UserService;

/**
 * @author Kris at 2018/9/20 17:00
 */
public class UserServiceImpl implements UserService {

    UserMapper userMapper = SqlSessionFactoryContainer.getSqlSessionFactory().openSession().getMapper(UserMapper.class);

    public User findById(Integer id) {
        return userMapper.findById(id);
    }

}
